#!/bin/bash

# 安装 wget
install_wget() {
    yum install -y wget
}

# 设置阿里镜像源
setup_yum_repo() {
    if grep -q "mirrors.aliyun.com" /etc/yum.repos.d/CentOS-Base.repo; then
        echo "*************************已经是阿里镜像源*************************"
    else
        echo "*************************开始重新设置镜像源*************************"
        rm -rf /etc/yum.repos.d/CentOS-Base.repo
        cp /app/pro/cz-23yw/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
        echo "*************************已经修改为阿里镜像*************************"
        echo "*************************清空缓存，并更新******************************"
        yum clean all && yum makecache && yum update -y
    fi
}